$(function(){
    showCondition(true);
    var wardData = $("#tabContent > .tab-pane.active").data();
    var range_ybbWard="";//查询数据的范围
    if(wardData.value != "undefined"){
    	paramTabPage[tabId] = wardData;
    	range_ybbWard = paramTabPage.previous;
    	if(wardData.previous == "depGroup"){   		
    		$('#'+tabId+' #ybbWardHeadTitle').append(wardData.depGroupName+"指标");
		}else{
    		$('#'+tabId+' #ybbWardHeadTitle').append(wardData.depName+"指标");
		}
	}else{
    	range_ywcWard="dep";//查询数据的范围
		$('#'+tabId+' #ybbWardHeadTitle').append(wardData.depName+"指标");
		// 获取当前登录的科室和科室名
		$.ajax({
			url : "DepCliMonitor/getRoleName.dhc",
			async : false,
			type : "POST",
			success : function(result) {
				var depCode = result.depCode;
				paramTabPage[tabId].depCode = depCode;
			}
		});
	}
    
	
	
	getQuotas("ybbWard", loadData, "wardallhosp-ul");
	
	function loadData(totalQuota){
		// 全院指标 (1.Hosp 2.All)  参数 4.为jsp中的div的id 5.jsp中ul的id
		loadHospQuota(range_ybbWard,totalQuota,"wardallhospQuotasId","wardallhosp-ul","ybWardTotal");
		// 加载指标的div 参数 3.为jsp中的div的id 4.jsp中ul的id
		loadDRGsQuota(totalQuota,"ward","病区","wardQuotasId","ward-ul");
	    // 病区指标的数据加载 
	    loadDRGsQuotaData(totalQuota,"ward",false,"ybWardDetail");
	}
});


